InternalAssessView=Ext.extend(Ext.Panel,{
    constructor:function(a){
        Ext.apply(this,a);
        var all=this.initUIComponents();
        InternalAssessView.superclass.constructor.call(this,{
            id:'InternalAssessView',
            title:'内部自评管理',
            region:'center',
            border:'false',
            layout:'border',
            iconCls : "menu-position",
            items : [all.yearGridPanel,all.yearGridSearchPanel]
        })
    },
    initUIComponents:function(){
        var yearGridComponents=new creategridview({
            topbar : {
                inputFormName : 'InternalAssessForm',
                topbarAdd:{
                    hidden:false
                },
                topbarDel:{
                    hidden:false
                }
            },
            search : {
                items : [ {
                    style : "margin:5px 5px 5px 5px;",
                    text : "自评填写人"
                }, {
                    columnWidth : 0.2,
                    xtype : "textfield",
                    name : "Q_inputName_S_LK",
                    maxLength : 256
                } ]
            },
            grid : {
                title : "内部自评列表",
                rowActions:true,
                listUrl : __ctxPath + "/safeachievements/listInternalAssess.do",//?Q_emergencyId_L_EQ="+this.emergencyId,
                removeUrl : __ctxPath + "/safeachievements/deleteInternalAssess.do",
                fields : [ "id", 'years','institution','ratingProjectSetTreeId', "ratingProjectSetTreeName",'startReviewDate',"endReviewDate", "groupLeader","groupMember","standardScore","inputName","sumScore","scoreDate"],
                columns : [ {
                    header : "id",
                    dataIndex : "id",
                    hidden : true
                }, {
                    header : "年份",
                    dataIndex : "years",
                    width : 50,
                    hidden:true,
                    sortable : true
                },new Ext.grid.Column({
                    header:'操作',
                    dataIndex:'grade',
                    width:100,
                    renderer:function(value,metaIndex,record,rowIndex,colIndex){
                        return '<a id="startGrade1" title="开始评分" onclick=\'InternalAssessView.startGrade1('
                        + record.data.id+ ','+record.data.ratingProjectSetTreeId+')\'>开始评分</a>';
                    }
                }),{
                    header:"所属机构",
                    dataIndex:'institution',
                    width:100
                },{
                    header : "自评开始时间",
                    dataIndex : "startReviewDate",
                    width : 100
                }, {
                    header : "自评结束时间",
                    dataIndex : "endReviewDate",
                    width : 70
                }, {
                    header:'自评组组长',
                    dataIndex:'groupLeader',
                    width:70
                },{
                    header : "自评组主要成员",
                    dataIndex : "groupMember",
                    width : 100
                }, {
                    header : "自评填写人",
                    dataIndex : "inputName",
                    width : 70
                }, {
                    header:"自评得分",
                    dataIndex:"sumScore",
                    width:100
                },{
                    header:'自评日期',
                    dataIndex:'scoreDate',
                    width:70
                }]
            }
        });
        return yearGridComponents;
    }
    
});
InternalAssessView.startGrade1=function(id,treeId){
    new InternalActivityFormRep({
        internalAssessId:id,
        ratingProjectSetTreeId:treeId
    }).show();
};